/**
 * @date 2:54:15 PM
 * EducationStudentQuestion.java
 * Administrator
 * TODO
 */
package com.qs.education.bean.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.Getter;
import lombok.Setter;

/**
 * @class EducationStudentQuestion
 * @author Warren
 * @description
 * @date Nov 15, 2018
 */
@Entity
@Table(name = "education_student_question")
@Getter
@Setter
public class EducationStudentQuestion {
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@ManyToOne
	@JoinColumn(name = "hq_id")
	@JsonIgnoreProperties(value = { "question", "homework" })
	private EducationHomeWorkQuestion homeworkQuestion;

	@ManyToOne
	@JoinColumn(name = "student_id")
	@JsonIgnoreProperties(value = { "school", "groups", "grade", "clazz" })
	private EducationStudent student;

	@ManyToOne
	@JoinColumn(name = "answer_id")
	@JsonIgnoreProperties(value = { "question", "educationStudentQuestionList" })
	private EducationAnswer answer;
}
